Image information, be it color or black and white, is commonly derived by scanning, initially at least, in a grey level format containing a large number of levels, e.g.: 256 levels for black and white and more than 16 million (256.sup.3) levels for color. This multi-level format is usually unprintable by standard printers.
The term "grey level" is used to described such data for both black and white and color applications. Standard printers print in a limited number of levels, either a spot or a no spot in the binary case, or a limited number of levels associated with the spot, for example, four in the quaternary case. Since grey level image data may be represented by very large values, it is necessary to reduce grey level image data to a limited number of levels so that it is printable. Besides grey level image information derived by scanning, certain processing techniques, such as computer generation, produce grey level pixel values which require such a conversion.
One such method for reducing the grey levels of a pixel is conventional error diffusion. In conventional error diffusion, the video signal for pixel X is modified to include the accumulated error diffused to this pixel from previous threshold processes. The modified video signal value X is compared with a threshold value 128, assuming a video range between 0 and 255. If it is determined that the modified video signal value X is greater than or equal to 128, the process outputs a value to indicate the turning ON of pixel X. The process then calculates the error associated with the threshold process wherein this error, Y, is calculate as being X-255.
On the other hand, if it is determined that the modified video signal value X is less than the threshold value 128, a signal is output indicating that the pixel X is to be turned OFF. The process then produces the error, Y, which is calculated as being equal to the value X.
The error is multiplied by weighting coefficients and distributed to downstream pixels. Thus, the error from the threshold process is diffused to adjacent pixels.
In describing the error diffusion process, it is assumed that the video value is in a range between 0 and 255. However, any chosen range for the video signal can be utilized. As described above, in conventional error diffusion methods, the binarization of the pixel or the reduction of its grey level is determined by comparing a modified input with a threshold. The modified input video signal is the input video signal, V, plus an accumulated error term, e.sub.i, determined from the processing of previous pixels.
Although conventional error diffusion renders a quality image, the process has problems when utilized with a segmented image. More specifically, in a segmented document, there may be numerous non-error diffused regions where different image processing rendering is desired, such as screening or thresholding. In these "non-error diffused" regions, the error diffusion calculation is not conventionally generated. Such a situation, however, is not conducive when attempting to render a smooth transition when entering the border areas of error diffused regions since the error that should be used would be based upon the image context surrounding this area. In other words, the error propagated to a pixel should always be based upon the surrounding video information when calculating the error. Typically, when encountering this situation, the error information to be used as entering the error diffused area is assumed to be based upon a pure OFF page "white background", but this assumption renders undesirable artifacts in the non-error diffused and error-diffused interface area.
The present invention proposes a method in which the error inside of non-error-diffused area regions is calculated and stored, thereby improving the image quality of segmented documents that mix these two image processing techniques.